/* 图像处理工具样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-tools {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* 图片上传区域 */
.image-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.upload-area i {
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.5rem;
}

.image-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: #999;
}

.preview-placeholder i {
    margin-bottom: 1rem;
}

#imageCanvas {
    max-width: 100%;
    max-height: 500px;
    display: none;
}

/* 编辑工具区域 */
.image-tools {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.tool-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tool-tab {
    padding: 0.8rem 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    position: relative;
}

.tool-tab.active {
    color: var(--primary);
    font-weight: bold;
}

.tool-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tool-content {
    padding: 1rem;
}

.tool-pane {
    display: none;
}

.tool-pane.active {
    display: block;
}

.tool-control {
    margin-bottom: 1rem;
}

.tool-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.tool-control input[type="range"] {
    width: 100%;
}

/* 滤镜区域 */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 裁剪区域 */
.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aspect-ratios {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.aspect-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.aspect-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 文字区域 */
.text-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* 工具操作按钮 */
.tool-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .text-options {
        flex-direction: column;
        align-items: flex-start;
    }
}